package com.example.recyclerviewtest;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;

import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class MainActivity extends AppCompatActivity {
    private List<TestBeam> testBeams = new ArrayList<>();
    private ClassifyRecyclerview custom;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        custom = findViewById(R.id.classify);
        for (int i=0;i<3;i++){
            testBeams.add(new TestBeam("你好",15,"广东"));
            testBeams.add(new TestBeam("善哉",18,"广东"));
            testBeams.add(new TestBeam("他们",13,"广东"));
            testBeams.add(new TestBeam("绘画",17,"广东"));
            testBeams.add(new TestBeam("哈哈",996,"广东"));
            testBeams.add(new TestBeam("零零",745,"广东"));
            testBeams.add(new TestBeam("啊里",214,"广东"));
            testBeams.add(new TestBeam("狗蛋",214,"广东"));
            testBeams.add(new TestBeam("问下",214,"广东"));
            testBeams.add(new TestBeam("塔恩",214,"广东"));
            testBeams.add(new TestBeam("怕去",214,"广东"));
            testBeams.add(new TestBeam("零级",214,"广东"));
            testBeams.add(new TestBeam("起来",214,"广东"));
            testBeams.add(new TestBeam("作者",214,"广东"));
            testBeams.add(new TestBeam("妈妈",214,"广东"));
            testBeams.add(new TestBeam("版本",214,"广东"));
            testBeams.add(new TestBeam("吾问下",214,"广东"));
            testBeams.add(new TestBeam("李博武",214,"广东"));
            testBeams.add(new TestBeam("哦哦",214,"广东"));
            testBeams.add(new TestBeam("嗯嗯",214,"广东"));
            testBeams.add(new TestBeam("看看",214,"广东"));
            testBeams.add(new TestBeam("得到",214,"广东"));
            testBeams.add(new TestBeam("作者",214,"广东"));
            testBeams.add(new TestBeam("请求",214,"广东"));
            testBeams.add(new TestBeam("噶",214,"广东"));
            testBeams.add(new TestBeam("咯",214,"广东"));
        }
        //对集合进行排序
        testBeams = SortUtils.sortForCn(testBeams,"name");
        //设置数据
        custom.setList(testBeams);
    }
}
